<?php
namespace Swoole\Socket;

class Timer{
    private $time;
    private $fun;
    function __construct($time, $fun){
        $this->time = $time;
        $this->fun = $fun;
    }
    public function start(){
        \swoole_timer_tick($this->time, $this->fun);
    }
}

?> 